home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 1 / QRZ Ham Radio Callsign Database - December 1993.iso / ucsd / packet / tcpip / sys5 / iscwmpst.z / iscwmpst / tcp / src / enet.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-25  |  1.5 KB  |  55 lines

  1. /* @(#) $Header: enet.h,v 1.3 91/02/24 20:16:43 deyke Exp $ */
  2.  
  3. #ifndef _ENET_H
  4. #define _ENET_H
  5.  
  6. /* Generic Ethernet constants and templates */
  7. #ifndef _GLOBAL_H
  8. #include "global.h"
  9. #endif
  10.  
  11. #ifndef _MBUF_H
  12. #include "mbuf.h"
  13. #endif
  14.  
  15. #ifndef _IFACE_H
  16. #include "iface.h"
  17. #endif
  18.  
  19. #define EADDR_LEN       6
  20. /* Format of an Ethernet header */
  21. struct ether {
  22.     char dest[EADDR_LEN];
  23.     char source[EADDR_LEN];
  24.     int16 type;
  25. };
  26. #define ETHERLEN        14
  27.  
  28. /* Ethernet broadcast address */
  29. extern char Ether_bdcst[];
  30.  
  31. /* Ethernet type fields */
  32. #define IP_TYPE         0x800   /* Type field for IP */
  33. #define ARP_TYPE        0x806   /* Type field for ARP */
  34. #define REVARP_TYPE     0x8035  /* Type field for reverse ARP */
  35.  
  36. #define RUNT            60      /* smallest legal size packet, no fcs */
  37. #define GIANT           1514    /* largest legal size packet, no fcs */
  38.  
  39. #define MAXTRIES        16      /* Maximum number of transmission attempts */
  40.  
  41. /* In file enet.c: */
  42. char *pether __ARGS((char *out,char *addr));
  43. int gether __ARGS((char *out,char *cp));
  44. int enet_send __ARGS((struct mbuf *bp,struct iface *iface,int32 gateway,int prec,
  45.     int del,int tput,int rel));
  46. int enet_output __ARGS((struct iface *iface,char dest[],char source[],int16 type,
  47.     struct mbuf *data));
  48. void eproc __ARGS((struct iface *iface,struct mbuf *bp));
  49.  
  50. /* In enethdr.c: */
  51. struct mbuf *htonether __ARGS((struct ether *ether,struct mbuf *data));
  52. int ntohether __ARGS((struct ether *ether,struct mbuf **bpp));
  53.  
  54. #endif  /* _ENET_H */
  55.